/**
 * @author huangsq
 * @version 1.0, Oct 29, 2016
 */
package cn.elwy.rcp.kit.yssuco.copy;

import org.eclipse.swt.widgets.Text;

import cn.elwy.common.log.Logger;
import cn.elwy.common.log.LoggerFactory;

/**
 * @author huangsq
 * @version 1.0, Oct 29, 2016
 */
public class UcoLogText implements UcoLog {

	private static Logger logger = LoggerFactory.getLogger(UcoLog.class);

	private Text msgText;

	/**
	 * 
	 */
	public UcoLogText(Text msgText) {
		this.msgText = msgText;
	}

	public void print(String text) {
		if (msgText != null) {
			msgText.append(text);
			msgText.append("\r\n");
		} else {
			logger.info(text);
		}
	}

}
